package itherit;

class Derived{
    int a;
    int b;
public void method1(){
    System.out.println(a);
}
}


public class Base extends Derived{
    int a;
    char b;
    int c;

    public void method(){
        super.a = 10;
        b = 20;
        c = 30;
        int d = 40;//方法中定义的局部变量，无法在方法外部被使用
    }

public void method2(){
    System.out.println(a+" "+b+" "+c);
    System.out.println(super.a);
    System.out.println(super.b);
}

    public static void main(String[] args) {
        Base base = new Base();
//        Derived der = new Derived();
////        der.method1();
//        System.out.println(der.a);
        base.method();
        base.method2();
    }
}


